1 00:00:00,330 --> 00:00:06,900 I opened up my my zombie game and I'm going to import my message queue into my zombie game. 2 00:00:06,900 --> 00:00:13,200 Let's go to the toolbox because we saved it off under my model's right inventory my models. 3 00:00:13,200 --> 00:00:14,940 I'll click on message queue. 4 00:00:14,970 --> 00:00:15,450 Yep. 5 00:00:15,450 --> 00:00:19,620 Warns me that there's three scripts in there and it's in the workspace. 6 00:00:19,620 --> 00:00:20,730 That's all right. 7 00:00:21,180 --> 00:00:22,680 I'm going to open this up. 8 00:00:22,920 --> 00:00:24,780 Let me get my message script. 9 00:00:24,780 --> 00:00:30,510 I'm going to drag it down into the starter g UI on the screen. 10 00:00:30,510 --> 00:00:31,590 G UI. 11 00:00:31,710 --> 00:00:32,700 There we go. 12 00:00:32,700 --> 00:00:40,950 And then I need my info message Ray that's going to go in replicated storage. 13 00:00:41,670 --> 00:00:47,880 Let's just drag that in there and then we're going to get our info message label that's also going to 14 00:00:47,880 --> 00:00:49,830 go in a replicated storage. 15 00:00:49,860 --> 00:00:52,650 I'm not going to use the message generator. 16 00:00:52,650 --> 00:01:00,480 We can go ahead and delete the model because I got what I wanted from it and now I want to go to my. 17 00:01:02,000 --> 00:01:03,990 Server script service. 18 00:01:04,010 --> 00:01:09,170 Open up the game manager and then let's make some calls to our message queue. 19 00:01:09,350 --> 00:01:16,400 Now, remember, we need to get that remote event, so I'll do a replicated storage variable here. 20 00:01:16,400 --> 00:01:20,210 Game, get service replicated storage. 21 00:01:20,780 --> 00:01:26,930 Then I'll do another variable for info info message. 22 00:01:26,930 --> 00:01:27,800 Oh my gosh. 23 00:01:27,800 --> 00:01:30,350 Ah, a replicated storage. 24 00:01:30,350 --> 00:01:33,100 Wait for child info message Ray. 25 00:01:34,040 --> 00:01:37,610 And let's go down to our check daily streak. 26 00:01:37,610 --> 00:01:39,170 That's where the magic happens. 27 00:01:39,800 --> 00:01:43,250 Right here we increase our shrink. 28 00:01:43,730 --> 00:01:52,610 So I'm going to fire a remote event, so it'll go in our queue and then we'll get some sort of message. 29 00:01:52,940 --> 00:02:01,220 Let's do info message re colon by our client to the player. 30 00:02:01,220 --> 00:02:02,510 And then here's our message. 31 00:02:02,510 --> 00:02:17,840 It'll be you in creased your streak and then maybe we'll give them some money to info message re via 32 00:02:17,840 --> 00:02:20,720 client player. 33 00:02:22,430 --> 00:02:26,420 You get 100 points. 34 00:02:27,680 --> 00:02:35,180 Cool and then they also have a daily reward. 35 00:02:35,180 --> 00:02:35,420 Right? 36 00:02:35,420 --> 00:02:39,190 Because this is the first time they logged in just for the day. 37 00:02:39,200 --> 00:02:44,240 Let's do an info message re fire client 38 00:02:46,400 --> 00:02:47,420 player. 39 00:02:48,680 --> 00:02:51,650 You get a daily. 40 00:02:53,350 --> 00:02:54,520 Reward. 41 00:02:55,060 --> 00:02:55,540 Whoo! 42 00:02:55,570 --> 00:02:56,530 That was kind of tough. 43 00:02:57,020 --> 00:02:59,800 I will give them 50 points for that. 44 00:02:59,980 --> 00:03:01,360 I'm just going to copy this. 45 00:03:01,360 --> 00:03:02,680 Control C. 46 00:03:03,010 --> 00:03:07,450 Control V, 50 points. 47 00:03:07,540 --> 00:03:10,330 And then we'll go ahead and give the points to our player. 48 00:03:12,860 --> 00:03:13,970 Player. 49 00:03:14,750 --> 00:03:16,160 Here we go. 50 00:03:16,160 --> 00:03:18,170 And we have leader stats on the leader. 51 00:03:18,170 --> 00:03:21,730 Stats points dot value. 52 00:03:21,740 --> 00:03:23,090 Don't forget the value. 53 00:03:23,270 --> 00:03:27,080 We're going to do a plus equals and that'll be total 150. 54 00:03:29,160 --> 00:03:30,150 Nice. 55 00:03:30,180 --> 00:03:31,500 Now. 56 00:03:33,140 --> 00:03:38,480 If we break our streak, it's still going to be a new day. 57 00:03:38,480 --> 00:03:40,550 So let's copy these. 58 00:03:41,870 --> 00:03:44,120 You get a daily reward. 59 00:03:44,600 --> 00:03:45,590 Let's go down here. 60 00:03:45,590 --> 00:03:46,610 They blew the streak. 61 00:03:46,970 --> 00:03:49,130 BOMBER Oh, we'll put that in there, too. 62 00:03:51,150 --> 00:03:52,110 Well, let's face this. 63 00:03:52,110 --> 00:03:53,490 For the daily reward. 64 00:03:53,580 --> 00:03:54,840 Daily reward? 65 00:03:54,870 --> 00:03:55,620 That's good. 66 00:03:55,620 --> 00:03:56,240 That's good. 67 00:03:56,250 --> 00:03:57,490 This is too much, right? 68 00:03:57,510 --> 00:03:58,350 They don't get the. 69 00:03:58,380 --> 00:03:59,820 They don't get the hundred. 70 00:04:01,070 --> 00:04:04,340 And then let's give them a message for the Daily Streak. 71 00:04:04,340 --> 00:04:05,870 The bad news. 72 00:04:05,960 --> 00:04:07,730 Info Message. 73 00:04:07,730 --> 00:04:11,960 Re Fire Client player. 74 00:04:12,380 --> 00:04:14,750 You ruined. 75 00:04:14,870 --> 00:04:16,580 You broke your streak. 76 00:04:16,700 --> 00:04:20,210 Broke your streak. 77 00:04:20,480 --> 00:04:22,640 Bow back to one. 78 00:04:23,680 --> 00:04:25,650 Oh, and let's write what our streak is. 79 00:04:25,660 --> 00:04:28,550 It says you increased your streak, but I can give the value. 80 00:04:28,570 --> 00:04:31,420 Let's go ahead and put a space in there. 81 00:04:31,990 --> 00:04:38,130 String concatenate, and then I'm going to get my player info. 82 00:04:38,140 --> 00:04:42,760 Street Value Control C Control V. 83 00:04:42,790 --> 00:04:44,830 I think I'll put this in the next line though. 84 00:04:45,280 --> 00:04:45,660 There you go. 85 00:04:45,670 --> 00:04:47,010 You can keep it all in one line. 86 00:04:47,020 --> 00:04:48,880 I just want you to be able to see it. 87 00:04:49,190 --> 00:04:49,500 All right. 88 00:04:49,510 --> 00:04:54,130 So that's one whole parameter as a string going over. 89 00:04:54,130 --> 00:04:56,890 I just use string concatenate for let's. 90 00:04:56,890 --> 00:05:00,570 I've been playing this today, so let's force a day or all over. 91 00:05:00,580 --> 00:05:09,310 Let's go down to initialize player data and right where we have our saved time, let's do a minus. 92 00:05:10,390 --> 00:05:14,020 86,400. 93 00:05:14,020 --> 00:05:16,030 So that's going to push us back a day. 94 00:05:16,600 --> 00:05:22,690 Hit the play button, go to view, go to output so we can look for errors. 95 00:05:22,870 --> 00:05:25,930 Oh, you increased your streak seven days. 96 00:05:25,930 --> 00:05:27,790 You get 100 points. 97 00:05:28,840 --> 00:05:30,850 You get a daily reward. 98 00:05:31,810 --> 00:05:35,080 You get 50 points, that's kind of cool. 99 00:05:35,600 --> 00:05:38,650 Now, the only thing is it gives the points right away. 100 00:05:38,650 --> 00:05:42,130 But you can play with this now that you know how to do client server stuff. 101 00:05:42,130 --> 00:05:46,150 And when we're doing our store, we're going to go from client to server. 102 00:05:46,150 --> 00:05:49,390 We're going we've been going server to client recently. 103 00:05:49,390 --> 00:05:55,030 Well, we've only gone server to client, I believe, but we're going to change that pretty soon. 104 00:05:55,030 --> 00:05:57,250 I will see you in the next video.